import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//配置element-plus国际化
import {zhCn}  from 'element-plus/es/locales.mjs'
//svg配置插件代码
import 'virtual:svg-icons-register'
//引入全局模板
import '@/styles/index.scss'
//自定义全局组件：注册组件为全局组件
import globalComponent from '@/components'
//引入路由
import router from './router'
//引入仓库
import pinia from './store'
//暗黑模式
import 'element-plus/theme-chalk/dark/css-vars.css'
//引入路由鉴权文件
import './permission'
//路由鉴权permission进度条样式
import "nprogress/nprogress.css"; // 必须引入
const app = createApp(App)

//element-plus国际化配置
app.use(ElementPlus,{
    locale:zhCn,
})
//按照仓库

app.use(pinia)
//注册路由模板
app.use(router)
//自定义全局组件
app.use(globalComponent)
//引入自定义组件文件
import { isHasButton } from '@/directive/has'
app.mount('#app')
